package gui.Error;

import java.awt.Container;
import java.awt.Dialog;
import java.awt.Frame;
import javax.swing.JDialog;
import javax.swing.JLabel;

public class ErrorDialogue extends JDialog {

	private static final long serialVersionUID = 1640000153894291492L;

	public ErrorDialogue(Frame owner,String erreur){
		super(owner,"Erreur",true);
		creer(owner,erreur);
	}
	
	public ErrorDialogue(Dialog owner,String erreur){
		super(owner,"Erreur",true);
		creer(owner,erreur);
	}
	
	private void creer(Container owner ,String erreur){
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		setContentPane(new JLabel(erreur));
		pack();
		setLocationRelativeTo(owner);
		setVisible(true);
	}
	
}
